# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=crozono
pkgver=5.6a51669
pkgrel=9
epoch=1
pkgdesc='A modular framework designed to automate the penetration testing of wireless networks from drones and such unconventional devices.'
groups=('blackarch' 'blackarch-drone' 'blackarch-wireless')
arch=('any')
url='https://github.com/crozono/crozono-free'
license=('custom:unknown')
depends=('python' 'python-colorama' 'python-pyfiglet' 'python-poormanslogging'
         'python-pexpect' 'aircrack-ng')
makedepends=('git')
source=("$pkgname::git+https://github.com/andy737/crozono-free.git")
#source=("$pkgname::git+https://github.com/crozono/crozono-free.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  cp -a * "$pkgdir/usr/share/$pkgname/"

  cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
cd /usr/share/$pkgname
exec python $pkgname.py "\$@"
EOF

  chmod +x "$pkgdir/usr/bin/$pkgname"
}

